<template>
  <div class="notic-bar">
    <div class="notice-img">✨</div>
    <div class="notice-bar-container">

      <div class="notice-bar__wrap">
        <div
          v-for="(item, index) in list"
          :key="index"
          class="notice-bar__wrap_text"
        >
          {{ item }}
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "Index",
  data() {
    return {
      list: ["新用户，赠送10000非学术token+5000学术token"],
    };
  },
};
</script>

<style lang="less" scoped>
.notic-bar {
  display: flex;
  margin: 5px;
  border-radius: 15px;
  padding: 2px 5px;
  // background: linear-gradient(to right,#6e8cf1,rgb(180, 204, 232));
  background: linear-gradient(to right,#6e8cf1,#c779d0,#4bc0c8);
}
.notice-bar-container {
  display: flex;
  width: calc(100% - 30px);
  height: 20px;
  overflow: hidden;
  margin-left: 5px;
}
.notice-img {
  width: 20px;
  height: 20px;
  font-size: 20px;
  margin: 0 5px;
}
.notice-bar__wrap {
  margin-left: 10px;
  display: flex;
  animation: move 20s linear infinite;
  line-height: 20px;
  color: #fff;

  .notice-bar__wrap_text {
    width: max-content;
    min-width: 100px;
    font-size: 12px;
    font-family: PingFang SC-Regular, PingFang SC;
    font-weight: 400;
    padding-right: 15px;
  }
}
@keyframes move {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(-100%);
  }
}
</style>
